home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / util / misc / VMM_src.lha / VMM / cat / VMM_Cat_c.sd < prev    next >
Encoding:
Text File  |  1995-01-15  |  1.6 KB  |  73 lines

  1. ##stringtype C
  2. ##shortstrings
  3. /****************************************************************
  4.    This file was created automatically by `%fv'
  5.    from "%f0".
  6.  
  7.    Do NOT edit by hand!
  8. ****************************************************************/
  9.  
  10. #include <clib/locale_protos.h>
  11.  
  12. static LONG %b_Version = %v;
  13. static const STRPTR %b_BuiltInLanguage = (STRPTR) %l;
  14.  
  15. struct FC_Type
  16. {   LONG   ID;
  17.     STRPTR Str;
  18. };
  19.  
  20.  
  21. const struct FC_Type _%i = { %d, %s };
  22.  
  23. extern struct LocaleBase *LocaleBase;
  24. extern UWORD VMD_NestCnt;
  25.  
  26. static struct Catalog *%b_Catalog = NULL;
  27.  
  28. /******************************************************************************************/
  29.  
  30. void Open%bCatalog (void)
  31. VMD_NestCnt++;
  32. if (LocaleBase != NULL)
  33.   %b_Catalog = OpenCatalog(NULL, (STRPTR) "VMM-Handler.catalog",
  34.                            OC_BuiltInLanguage, %b_BuiltInLanguage,
  35.                            OC_Version, %b_Version,
  36.                            TAG_DONE);
  37. VMD_NestCnt--;
  38. }
  39.  
  40. /******************************************************************************************/
  41.  
  42. void Close%bCatalog (void)
  43. VMD_NestCnt++;
  44. if (LocaleBase != NULL)
  45.   CloseCatalog(%b_Catalog);
  46. %b_Catalog = NULL;
  47. VMD_NestCnt--;
  48. }
  49.  
  50. /******************************************************************************************/
  51.  
  52. STRPTR Get%bString(APTR fcstr)
  53. STRPTR defaultstr;
  54. LONG strnum;
  55. STRPTR tmp;
  56.  
  57. strnum = ((struct FC_Type *) fcstr)->ID;
  58. defaultstr = ((struct FC_Type *) fcstr)->Str;
  59.  
  60. if (LocaleBase != NULL)
  61.   {
  62.   VMD_NestCnt++;
  63.   tmp = GetCatalogStr(%b_Catalog, strnum, defaultstr);
  64.   VMD_NestCnt--;
  65.   return (tmp);
  66.   }
  67.  
  68. return (defaultstr);
  69. }
  70.